//Vue初始化
//加载地图口令
var webKey = "e420b4283c4968c892cfcd839ad2e87c";
// 首先设置好WMTS瓦片地图的投影坐标系,获取WGS84投影坐标系(EPSG4326)，获取墨卡托投影为EPSG3857
var projection = new ol.proj.get("EPSG:4326");
var projectionExtent = projection.getExtent();
var projection2 = new ol.proj.get('EPSG:3857');
var projectionExtent2 = projection2.getExtent();//获取范围
//设置天地图分辨率
var resolutions = [
    1.40625,
    0.703125,
    0.3515625,
    0.17578125,
    0.087890625,
    0.0439453125,
    0.02197265625,
    0.010986328125,
    0.0054931640625,
    0.00274658203125,
    0.001373291015625,
    0.0006866455078125,
    0.00034332275390625,
    0.000171661376953125,
    0.0000858306884765625,
    0.00004291534423828125,
    0.000021457672119140625,
    0.000010728836059570312,
    0.000005364418029785156,
    0.000002682209014892578,
    0.000001341104507446289
];
var resolutions2 = [
    156543.033928041,
    78271.5169640205,
    39135.75848201025,
    19567.879241005125,
    9783.939620502562,
    4891.969810251281,
    2445.9849051256406,
    1222.9924525628203,
    611.4962262814101,
    305.7481131407051,
    152.87405657035254,
    76.43702828517627,
    38.218514142588134,
    19.109257071294067,
    9.554628535647034,
    4.777314267823517,
    2.3886571339117584,
    1.1943285669558792,
    0.5971642834779396,
];

//设置缩放等级
var matrixIds = new Array(21);
for (var z = 0; z < 21; z++) {
    matrixIds[z] = z;
}
var app_login;
var map,mapOne;
var iconSourceSluice,iconSourceSluiceOne;
var iconSourceSluiceText,iconSourceSluiceTextOne;
var iconLayerSluice,iconLayerSluiceOne;
var iconLayerSluiceText,iconLayerSluiceTextOne;
app_login = new Vue({
    el: '#app_1',
    data: {
        boxShow:true,
        navOpen:['1-1','1-2','1-3'],
        navShow:[{cut:true},{cut:false},{cut:false},{cut:false},{cut:false},{cut:false},{cut:false},{cut:false},{cut:false},],
        divisionSelect:'',
        pageHide:false,
        currentPage: 1,
        pageSize:15,
        totalPage:15,
        dialogSluiceVisible: false,
        dialogEditVisible:false,
        dialogEditSluiceReport:false,
        dialogSluiceVisibleOne:false,
        dialogSluiceTitle:'',
        dialogEditTitle:'',
        dialogEditSluiceReportTitle:'',
        dialogSluiceTitleOne:'',
        sluiceNameSearch:'',
        firstOpenSluiceList:'true',
        firstOpenSluiceOne:'true',
        idHide:'',
        addHumanName:'',
        sexValue:'',
        idCard:'',
        belongDivision:'',
        phoneNumber:'',
        role:'',
        address:'',
        sluiceSelect:'',
        nameSearch:'',
        loadingChannel:'',
        date1:'',
        dailySelect:'',
        dailySelectAbnormal:'',
        tenDaysSelect:'',
        monthSelect:'',
        yearSelect:'',
        editFirstFlow:'',
        editSecondFlow:'',
        editThirdFlow:'',
        editFourthFlow:'',
        sluiceLat:'',
        sluiceLong:'',
        sluiceName:'',
        inspectionDate:'',
        pickerOptions: {
            shortcuts: [{
                text: '最近一周',
                onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                    picker.$emit('pick', [start, end]);
                }
            }, {
                text: '最近一个月',
                onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                    picker.$emit('pick', [start, end]);
                }
            }, {
                text: '最近三个月',
                onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                    picker.$emit('pick', [start, end]);
                }
            }]
        },
        sluiceInfo:[
            {
                value: '一号测站',
                label: '一号测站'
            },{
                value: '二号测站',
                label: '二号测站'
            },{
                value: '三号测站',
                label: '三号测站'
            },{
                value: '四号测站',
                label: '四号测站'
            },{
                value: '五号测站',
                label: '五号测站'
            },{
                value: '六号测站',
                label: '六号测站'
            },
        ],
        roleInfo:[
            {
                value: '巡检员',
                label: '巡检员'
            }, {
                value: '管理员',
                label: '管理员'
            }
        ],
        sexInfo: [
            {
                value: '男',
                label: '男'
            }, {
                value: '女',
                label: '女'
            }
        ],
        divisionInfo: [
            {
                value: '九师',
                label: '九师'
            }, {
                value: '161团',
                label: '161团'
            }, {
                value: '162团',
                label: '162团'
            }, {
                value: '163团',
                label: '163团'
            }, {
                value: '164团',
                label: '164团'
            }, {
                value: '165团',
                label: '165团'
            }, {
                value: '166团',
                label: '166团'
            }, {
                value: '167团',
                label: '167团'
            }, {
                value: '168团',
                label: '168团'
            }, {
                value: '169团',
                label: '169团'
            }, {
                value: '170团',
                label: '170团'
            }
        ],
        tableHumanData: [
            {
                id:'10001',
                order: '1',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            }, {
                id:'10001',
                order: '2',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '3',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '4',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '5',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '6',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '7',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '8',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '9',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '10',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '11',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '12',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '13',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '14',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '15',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                idCard:'372928197009121222',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },
        ],
        tableSluiceInfo: [
            {
                id:'10001',
                order: '1',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '2',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '3',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '4',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '5',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'未完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '6',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '7',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '8',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '9',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'',
                reportTag:'未完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '10',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '11',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '12',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '13',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '14',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '15',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:'已完成',
                long:'',
                lat:'',
            },
        ],
        tableSluiceWarning: [
            {
                id:'10001',
                order: '1',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '2',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '3',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'1.3',
                reportTag:{
                    data:'未完成',
                    difference:'',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '4',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'1.3',
                reportTag:{
                    data:'',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '5',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '6',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '7',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'1.3',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '8',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'1.3',
                fourthUpDate:'',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '9',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '10',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '11',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '12',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '13',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:{
                    data:'',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '14',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },{
                id:'10001',
                order: '15',
                name: '一号测站',
                sex: '男',
                address:'161团3连',
                belongDivision:'161团',
                humanName:'王小虎',
                reportDate:'2022-09-08',
                firstUpDate:'0.3',
                secondUpDate:'0.3',
                thirdUpDate:'0.3',
                fourthUpDate:'0.3',
                reportTag:{
                    data:'未完成',
                    difference:'差值过大',
                },
                long:'',
                lat:'',
            },
        ],
        tableDailyReport:[
            {
                id:'10001',
                order: '1',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '2',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '3',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '4',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '5',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '6',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '7',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '8',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '9',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '10',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '11',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '12',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '13',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '14',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '15',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            }
        ],
        tableTenDaysReport:[
            {
                id:'10001',
                order: '1',
                reportName: '161团第一期日报',
                reportDate: '2022-09-12',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '2',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '3',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '4',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '5',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '6',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '7',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '8',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '9',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '10',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '11',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '12',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '13',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '14',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            },{
                id:'10001',
                order: '15',
                reportName: '161团第一期日报',
                reportDate: '2022-09-06',
                startDate:'2022-09-01',
                endDate:'2022-09-10',
                reportPeople:'王小虎',
                belongDivision:'161团',
                phone:'18299082583',
                role:'巡检员',
            }
        ],
        sluiceList:[
            {
                order: '1',
                sluiceName:'一号测站',
            },{
                order: '2',
                sluiceName:'一号测站',
            },{
                order: '3',
                sluiceName:'一号测站',
            },{
                order: '4',
                sluiceName:'一号测站',
            },{
                order: '5',
                sluiceName:'一号测站',
            },{
                order: '6',
                sluiceName:'一号测站',
            },{
                order: '7',
                sluiceName:'一号测站',
            },
        ],
        czData: [
            {
                order: '1',
                name: '一号测站',
                status: '正常',
            }, {
                order: '2',
                name: '一号测站',
                status: '异常',
            },{
                order: '3',
                name: '一号测站',
                status: '正常',
            },{
                order: '4',
                name: '一号测站',
                status: '异常',
            },{
                order: '5',
                name: '一号测站',
                status: '异常',
            },{
                order: '1',
                name: '一号测站',
                status: '正常',
            },{
                order: '6',
                name: '一号测站',
                status: '异常',
            },{
                order: '7',
                name: '一号测站',
                status: '正常',
            },{
                order: '8',
                name: '一号测站',
                status: '正常',
            },{
                order: '9',
                name: '一号测站',
                status: '正常',
            },{
                order: '10',
                name: '一号测站',
                status: '正常',
            },{
                order: '11',
                name: '一号测站',
                status: '正常',
            },{
                order: '12',
                name: '一号测站',
                status: '正常',
            },{
                order: '13',
                name: '一号测站',
                status: '正常',
            },{
                order: '14',
                name: '一号测站',
                status: '正常',
            },{
                order: '15',
                name: '一号测站',
                status: '正常',
            },{
                order: '16',
                name: '一号测站',
                status: '正常',
            },{
                order: '17',
                name: '一号测站',
                status: '正常',
            },{
                order: '18',
                name: '一号测站',
                status: '正常',
            },{
                order: '19',
                name: '一号测站',
                status: '正常',
            },{
                order: '20',
                name: '一号测站',
                status: '正常',
            },
        ],
        logInfoData:[
            {
                id:'10001',
                order: '1',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '2',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '3',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '4',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '5',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '6',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '7',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '8',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '9',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '10',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '11',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '12',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '13',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '14',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            },{
                id:'10001',
                order: '15',
                name: '王小虎',
                sex: '男',
                address:'九师客运站',
                belongDivision:'161团',
                lastLogin:'2022年8月30日',
                phoneNumber:'13139930919',
                frequencySeven:'10',
                frequencyMonth:'30',
                frequencyYear:'30',
            }
        ],


    },

    created(){
        this.openFullScreen2();
        this.dailySelect=this.formatDate(new Date());
        this.dailySelectAbnormal=this.formatDate(new Date());
    },


    methods: {
        //页面加载，根据选项获取人员信息
        handleTableInfo(){
            //获取相关筛选条件
            var divisionSelect = this.divisionSelect;

            //获取当前页码和页内数量,并设置总条数
            //var humanBaseDataAll = getHumanBase(this.currentPage,this.pageSize);
            //var humanBaseData = humanBaseDataAll.data;
            // this.tableHumanData.splice(0,this.tableHumanData.length);
            // for (var i=0;i<humanBaseData.length;i++){
            //     this.tableData[i]={
            //         id:humanBaseData[i].id,
            //         order: (this.currentPage-1)*this.pageSize+i+1,
            //         name: humanBaseData[i].xm,
            //         sex: humanBaseData[i].xb,
            //         born:humanBaseData[i].csny,
            //         idCard:humanBaseData[i].shzhm,
            //         position:humanBaseData[i].xrzw,
            //         level:humanBaseData[i].jb,
            //         political:humanBaseData[i].zzmm,
            //         nation:humanBaseData[i].mz,
            //         education:humanBaseData[i].whcd,
            //         employer:humanBaseData[i].gzdw,
            //
            //     };
            // }
            // this.totalPage = humanBaseDataAll.totalCount;
        },
        //打开新增人事信息窗口
        handleAddOpen(){
            this.dialogEditVisible=true;
            this.dialogEditTitle='新增用户信息';
            //面板内容置空
            this.idHide='';
            this.addHumanName='';
            this.sexValue='';
            this.idCard='';
            this.belongDivision='';
            this.phoneNumber='';
            this.role='';
            this.address='';
            this.sluiceSelect='';
        },
        //打开编辑人事信息窗口
        handleEditOpen(){
            this.dialogEditVisible=true;
            this.dialogEditTitle='编辑用户信息';
            //面板内容置空
            this.idHide='1';
            this.addHumanName='王小虎';
            this.sexValue='男';
            this.idCard='410927199910016012';
            this.belongDivision='161团';
            this.phoneNumber='13139930919';
            this.role='巡检员';
            this.address='九师客运站';
            this.sluiceSelect=['一号测站','二号测站','三号测站'];
        },
        //打开编辑测站上报信息窗口
        handleEditSluice(){
            this.dialogEditSluiceReport=true;
            this.dialogEditSluiceReportTitle='一号测站当日上报流量信息';
        },
        //保存新增的人事信息
        handleSaveAdd(){
            if ((this.addHumanName=='')||(this.sexValue=='')||(this.idCard=='')||(this.belongDivision=='')||(this.phoneNumber=='')||(this.role=='')||(this.address=='')||(this.sluiceSelect=='')){
                this.$message.error('请检查是否存在未填项!');
                return;
            }
            //人事信息内容
            var addHumanInfo = {
                id:this.idHide,
            };
            console.log(addHumanInfo);
            //向数据库提交数据
            //var addResult = submitHumanInfo(addHumanInfo);
            if (200==200){
                this.dialogEditVisible = false;
                this.openSubSuccess();
                //this.handleTableInfo();
            }else {
                this.openSubFail();
            }
        },
        //保存编辑的上报流量信息
        handleSaveSluiceReport(){

            if ((this.editFirstFlow=='')||(this.editSecondFlow=='')||(this.editThirdFlow=='')||(this.editFourthFlow=='')){
                this.$message.error('请检查是否存在未填项!');
                return;
            }
            //流量信息内容
            var addHumanInfo = {
                id:this.idHide,
            };
            console.log(addHumanInfo);
            //向数据库提交数据
            //var addResult = submitHumanInfo(addHumanInfo);
            if (200==200){
                this.dialogEditSluiceReport = false;
                this.openSubSuccess();
                //this.handleTableInfo();
            }else {
                this.openSubFail();
            }
        },
        //提交信息后相关反馈
        openSubSuccess() {
            this.$confirm('信息保存成功!', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },
        openSubFail() {
            this.$confirm('信息保存失败!', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'error'
            })
        },
        //保存信息中存在未填项
        openNoIntact(){
            this.$confirm('保存信息中存在未填项!', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'warning'
            })
        },
        //姓名或身份证搜索
        handleNameSearch(){
            this.divisionSelect = '';

            var searchObj = {
                nameOrIdCard:this.nameSearch,
            };
            if(this.nameSearch==''){
                //this.handleTableInfo();
                return;
            }
            //var searchData = searchHuman(searchObj);
            if (0!=0){
                this.currentPage = 1;
                this.tableData.splice(0,this.tableData.length);
                this.totalPage = searchData.length;
                for (var i=0;i<searchData.length;i++){
                    this.tableData[i]={
                        id:searchData[i].id,
                        order: i+1,
                        name: searchData[i].xm,
                        sex: searchData[i].xb,
                        born:searchData[i].csny,
                        idCard:searchData[i].shzhm,
                        position:searchData[i].xrzw,
                        level:searchData[i].jb,
                        political:searchData[i].zzmm,
                        nation:searchData[i].mz,
                        education:searchData[i].whcd,
                        address:searchData[i].jtzz,

                    };
                }
            }else {
                this.openNobody();
            }

        },
        //未查询到相关人员信息
        openNobody() {
            this.$confirm('未查询到相关人员信息，请检查您的输入?', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'warning'
            })
        },
        //行政区划筛选
        handleDivisionFilter(){
            console.log('行政区划筛选');
        },
        //导出人事信息
        handleExportInfo(){
            this.openExportInfoSuccess();
        },
        //人事信息导出成功
        openExportInfoSuccess() {
            this.$confirm('人员信息导出成功?', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },

        //目录资源类型切换
        handleCatalogOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleCatalogClose(key, keyPath) {
            console.log(key, keyPath);
        },
        handleCatalogSelect(key, keyPath) {
            for(var i=0;i<9;i++){
                if (key==i){
                    this.navShow[i].cut=true;
                }else{
                    this.navShow[i].cut=false;
                }
            }
            //如果打开第二个菜单，则写入用户登录日志饼状图
            if(key==1){
                this.barCount();
                this.circleCount();
                var endDate=this.formatDate(new Date());
                var startDate = this.formatDate(new Date()).substring(0,8)+'01';
                this.date1=[startDate,endDate];
            }
            //如果打开第三个菜单，则写入巡检相关统计信息
            if(key==3){
                this.allStatusStatistic();
                this.wrongStatusStatistic();
                var endDate=this.formatDate(new Date());
                var startDate = this.formatDate(new Date()).substring(0,8)+'01';
                this.inspectionDate=[startDate,endDate];
            }

        },
        formatDate(date) {
            const year = date.getFullYear();
            let month = date.getMonth() + 1;
            let day = date.getDate();
            if (month < 10) {
                month = `0${month}`
            }
            if (day < 10) {
                day = `0${day}`
            }
            return (`${year}-${month}-${day}`)
        },
        barCount() {
            $("#barCard").removeAttr("_echarts_instance_").empty();//清空echarts画布

            //获取统计信息
            // var dataLevel = getLevel();
            var divisionName = ['九师直属', '161团', '162团', '163团', '164团', '165团', '166团', '167团', '168团', '169团', '170团'];
            var barCount = ['8', '12', '18', '23', '32', '25', '19', '16', '12', '9', '7', ];
            // for (var i=0;i<dataLevel.length;i++){
            //     levelName[i]=dataLevel[i].key;
            //     levelCount[i]=dataLevel[i].value;
            // }
            //设置各行政区用户登录统计柱状图
            var dom = document.getElementById("barCard");
            var myChart = echarts.init(dom);
            var option;
            var colors = ['#059fff','#01d700','#ff9700', '#ee6666',];
            var colorsRich = ['#00bbec','#ec5399','#fff537','#ff8300','#bd59d4','#cbe591','#846add','#2c6ed5','#00ad5f','#ff8300','#955542','#ff5f3d','#7669cd',];

            option = {
                color: colorsRich,
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross'
                    }
                },
                grid: {
                    right: '8%',
                    bottom:'15%',
                },

                legend: {
                    data: ['登录次数', ]
                },
                xAxis: [
                    {
                        type: 'category',
                        axisTick: {
                            alignWithLabel: true
                        },
                        // prettier-ignore
                        data: divisionName,
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '次数',
                        position: 'left',
                        alignTicks: true,
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: '#000000',
                            }
                        },
                        axisLabel: {
                            formatter: '{value}'
                        }
                    }
                ],
                series: [
                    {
                        name: '登录次数',
                        type: 'bar',
                        data: barCount,
                        barWidth:20,
                        itemStyle: {
                            normal: {
                                label: {
                                    formatter: "{c}"+"次",
                                    show: true,
                                    position: "top",
                                    textStyle: {
                                        fontWeight: "bolder",
                                        fontSize: "12",
                                        color: "#000"
                                    }
                                },
                                opacity: 1
                            }
                        }

                    },
                ]
            };
            myChart.setOption(option, true);
            myChart.getZr().on('click', (params) => {
                const pointInPixel = [params.offsetX, params.offsetY];
                //点击第几个柱子
                let index;
                if (myChart.containPixel('grid', pointInPixel)) {
                    index = myChart.convertFromPixel({seriesIndex: 0}, [params.offsetX, params.offsetY])[0];
                }
                if (index==0){
                    this.openClickBar();
                }else if (index==1){
                    this.openClickBar();
                }else if (index==2){
                    this.openClickBar();
                }else if (index==3){
                    this.openClickBar();
                }else if (index==4){
                    this.openClickBar();
                }else {
                    this.openClickBar();
                }

            })
        },
        circleCount() {
            $("#circleCard").removeAttr("_echarts_instance_").empty();//清空echarts画布

            //获取统计信息
            // var dataLevel = getLevel();
            var divisionName = ['九师直属', '161团', '162团', '163团', '164团', '165团', '166团', '167团', '168团', '169团', '170团'];
            var circleCount = ['8', '12', '18', '23', '32', '25', '19', '16', '12', '9', '7', ];
            //写入饼状图
            var dom1 = document.getElementById("circleCard");
            var myChart = echarts.init(dom1);
            var option1;
            var colors1 = ['#01d700','#059fff','#ff9700',];
            var colorsRich = ['#00bbec','#ec5399','#fff537','#ff8300','#bd59d4','#cbe591','#846add','#2c6ed5','#00ad5f','#ff8300','#955542','#ff5f3d','#7669cd',];
            option1 = {
                color: colorsRich,
                tooltip: {
                    trigger: 'item',
                    formatter: '{b}: {c} ({d}%)',
                },
                legend: {
                    data: divisionName,
                },
                series: [
                    {
                        type: 'pie',
                        selectedMode: 'single',
                        center: ['50%', '59%'],
                        radius: [0, '56%'],
                        labelLine: {
                            length: 15,
                        },
                        label: {
                            formatter: '{b|{b}：}{c}次({per|{d}%})',
                            rich: {},
                            color:'#000000',
                        },
                        data: [
                            { value: 8, name: '九师直属' },
                            { value: 12, name: '161团' },
                            { value: 18, name: '162团' },
                            { value: 23, name: '163团' },
                            { value: 32, name: '164团' },
                            { value: 25, name: '165团' },
                            { value: 19, name: '166团' },
                            { value: 16, name: '167团' },
                            { value: 12, name: '168团' },
                            { value: 9, name: '169团' },
                            { value: 7, name: '170团' },
                        ],
                    },
                ]
            };
            myChart.setOption(option1, true);
            myChart.getZr().on('click', (params) => {
                const pointInPixel = [params.offsetX, params.offsetY];
                //点击第几个饼
                let index;
                if (myChart.containPixel('grid', pointInPixel)) {
                    index = myChart.convertFromPixel({seriesIndex: 0}, [params.offsetX, params.offsetY])[0];
                }
                if (index==0){
                    this.openClickBar();
                }else if (index==1){
                    this.openClickBar();
                }else if (index==2){
                    this.openClickBar();
                }else if (index==3){
                    this.openClickBar();
                }else if (index==4){
                    this.openClickBar();
                }else {
                    this.openClickBar();
                }

            })
        },
        allStatusStatistic(){
            $("#allStatusStatistic").removeAttr("_echarts_instance_").empty();//清空echarts画布

            //获取统计信息
            // var dataLevel = getLevel();
            var divisionName = ['九师直属', '161团', '162团', '163团', '164团', '165团', '166团', '167团', '168团', '169团', '170团'];
            var barCountAll = ['8', '12', '18', '23', '32', '25', '19', '16', '12', '9', '7', ];
            var barCountRright = ['2', '6', '12', '17', '26', '19', '13', '10', '6', '3', '1', ];
            var barCountWrong = ['1', '2', '3', '5', '6', '4', '3', '5', '3', '2', '1', ];
            var barCountLast = ['5', '4', '3', '1', '0', '2', '3', '1', '3', '4', '5', ];
            // for (var i=0;i<dataLevel.length;i++){
            //     levelName[i]=dataLevel[i].key;
            //     levelCount[i]=dataLevel[i].value;
            // }
            //设置各行政区用户登录统计柱状图
            var dom = document.getElementById("allStatusStatistic");
            var myChart = echarts.init(dom);
            var option;
            var colors = ['#059fff','#01d700','#ff9700', '#ee6666',];
            var colorsRich = ['#00bbec','#ec5399','#fff537','#ff8300','#bd59d4','#cbe591','#846add','#2c6ed5','#00ad5f','#ff8300','#955542','#ff5f3d','#7669cd',];

            option = {
                title:{
                    text:'各区巡检统计'
                },
                color: colorsRich,
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross'
                    }
                },
                grid: {
                    right: '4%',
                    bottom:'15%',
                    left:'7%',
                },

                legend: {
                    data: ['应巡检次数','正常巡检','异常巡检','剩余应巡检', ]
                },
                xAxis: [
                    {
                        type: 'category',
                        axisTick: {
                            alignWithLabel: true
                        },
                        // prettier-ignore
                        data: divisionName,
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        name: '次数',
                        position: 'left',
                        alignTicks: true,
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: '#000000',
                            }
                        },
                        axisLabel: {
                            formatter: '{value}'
                        }
                    }
                ],
                series: [
                    {
                        name: '正常巡检',
                        type: 'bar',
                        data: barCountRright,
                        stack:'ad',
                        barWidth:25,

                    },
                    {
                        name: '异常巡检',
                        type: 'bar',
                        data: barCountWrong,
                        stack:'ad',
                        barWidth:25,

                    },
                    {
                        name: '剩余应巡检',
                        type: 'bar',
                        data: barCountLast,
                        stack:'ad',
                        barWidth:25,


                    },
                    {
                        name: '应巡检次数',
                        type: 'bar',
                        data: barCountAll,
                        barWidth:25,



                    },
                ]
            };
            myChart.setOption(option, true);
            myChart.getZr().on('click', (params) => {
                const pointInPixel = [params.offsetX, params.offsetY];
                //点击第几个柱子
                let index;
                if (myChart.containPixel('grid', pointInPixel)) {
                    index = myChart.convertFromPixel({seriesIndex: 0}, [params.offsetX, params.offsetY])[0];
                }
                if (index==0){
                    this.openClickBar();
                }else if (index==1){
                    this.openClickBar();
                }else if (index==2){
                    this.openClickBar();
                }else if (index==3){
                    this.openClickBar();
                }else if (index==4){
                    this.openClickBar();
                }else {
                    this.openClickBar();
                }

            })
        },
        wrongStatusStatistic(){
            $("#wrongStatusStatistic").removeAttr("_echarts_instance_").empty();//清空echarts画布

            //获取统计信息
            // var dataLevel = getLevel();
            var divisionName = ['九师直属', '161团', '162团', '163团', '164团', '165团', '166团', '167团', '168团', '169团', '170团'];
            var barCountAll = ['8', '12', '18', '23', '32', '25', '19', '16', '12', '9', '7', ];
            var barCountRright = ['2', '6', '12', '17', '26', '19', '13', '10', '6', '3', '1', ];
            var barCountWrong = ['1', '2', '3', '5', '6', '4', '3', '5', '3', '2', '1', ];
            var barCountLast = ['5', '4', '3', '1', '0', '2', '3', '1', '3', '4', '5', ];
            var barCountOnlyWrong = ['1','1','2', '2','3', '3', '3',  '4', '5', '5',  '6',  ];
            // for (var i=0;i<dataLevel.length;i++){
            //     levelName[i]=dataLevel[i].key;
            //     levelCount[i]=dataLevel[i].value;
            // }
            //设置各行政区用户登录统计柱状图
            var dom = document.getElementById("wrongStatusStatistic");
            var myChart = echarts.init(dom);
            var option;
            var colors = ['#059fff','#01d700','#ff9700', '#ee6666',];
            var colorsRich = ['#00bbec','#ec5399','#fff537','#ff8300','#bd59d4','#cbe591','#846add','#2c6ed5','#00ad5f','#ff8300','#955542','#ff5f3d','#7669cd',];

            option = {
                title:{
                    text:'各区异常巡检统计'
                },
                color: colorsRich,
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                grid: {
                    right: '12%',
                    bottom:'8%',
                    left:'15%',
                },

                legend: {
                    data: ['应巡检次数','正常巡检','异常巡检','剩余应巡检', ]
                },
                xAxis: [
                    {
                        type: 'value',
                        name: '次数',
                        alignTicks: true,
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: '#000000',
                            }
                        },
                        axisLabel: {
                            formatter: '{value}'
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'category',
                        axisTick: {
                            alignWithLabel: true
                        },
                        // prettier-ignore
                        data: divisionName,
                    }

                ],
                series: [
                    {
                        name: '异常巡检',
                        type: 'bar',
                        data: barCountOnlyWrong,
                        barWidth:25,
                        itemStyle: {
                            normal: {
                                label: {
                                    formatter: "{c}"+"次",
                                    show: true,
                                    position: "insideBottom",
                                    textStyle: {
                                        fontWeight: "bolder",
                                        fontSize: "12",
                                        color: "#000"
                                    }
                                },
                                opacity: 1
                            }
                        }

                    },
                ]
            };
            myChart.setOption(option, true);
            myChart.getZr().on('click', (params) => {
                const pointInPixel = [params.offsetX, params.offsetY];
                //点击第几个柱子
                let index;
                if (myChart.containPixel('grid', pointInPixel)) {
                    index = myChart.convertFromPixel({seriesIndex: 0}, [params.offsetX, params.offsetY])[0];
                }
                if (index==0){
                    this.openClickBar();
                }else if (index==1){
                    this.openClickBar();
                }else if (index==2){
                    this.openClickBar();
                }else if (index==3){
                    this.openClickBar();
                }else if (index==4){
                    this.openClickBar();
                }else {
                    this.openClickBar();
                }

            })
        },
        checkUnsuccess() {
            this.$confirm('用户名或密码填写错误!', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'warning'
            })
        },
        checkRegisterInfo() {
            this.$confirm('注册成功!', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },
        //页面加载，根据选项获取人员信息
        handleTableInfo(){
            //获取相关筛选条件
            var divisionSelect = this.divisionSelect;
            //显示页码
            //获取当前页码和页内数量,并设置总条数
            // var talkBaseDataAll = getTalkBase(this.currentPage,this.pageSize,talkTypeFilter);
            // var talkBaseData = talkBaseDataAll.data;
            // this.tableData.splice(0,this.tableData.length);
            // for (var i=0;i<talkBaseData.length;i++){
            //     this.tableData[i]={
            //         id:talkBaseData[i].baseInfo.id,
            //         talkId:talkBaseData[i].id,
            //         order: (this.currentPage-1)*this.pageSize+i+1,
            //         name: talkBaseData[i].baseInfo.xm,
            //         sex: talkBaseData[i].baseInfo.xb,
            //         born:talkBaseData[i].baseInfo.csny,
            //         idCard:talkBaseData[i].baseInfo.shzhm,
            //         position:talkBaseData[i].baseInfo.xrzw,
            //         level:talkBaseData[i].baseInfo.jb,
            //         phone:talkBaseData[i].baseInfo.phone,
            //         talkType:talkBaseData[i].talkType.typeValue,
            //         talkTypeId:talkBaseData[i].talkType.id,
            //         talkDate:talkBaseData[i].talkDate,
            //         talkPerson:talkBaseData[i].talkPerson,
            //         talkContent:talkBaseData[i].talkContent,
            //         talkSelfAttitude:talkBaseData[i].talkSelfAttitude,
            //         employer:talkBaseData[i].baseInfo.gzdw,
            //         filePath:talkBaseData[i].filePath,
            //         fileName:talkBaseData[i].fileName,
            //
            //     };
            // }
            // this.totalPage = talkBaseDataAll.totalCount;
        },
        handleSizeChange(val) {
            this.pageSize = val;
            this.handleTableInfo();
        },
        handleCurrentChange(val) {
            this.currentPage = val;
            this.handleTableInfo();
        },
        //删除当日上报流量信息
        handleDeleteSluiceReport(index, row) {
            console.log(index, row);
            this.talkId = row.talkId;
            this.openDeleteSluiceReport();
        },
        openDeleteSluiceReport() {
            this.$confirm('确认删除此条上报流量信息?', '提示', {
                cancelButtonText: '取消',
                confirmButtonText: '确定',
                type: 'warning'
            }).then(() => {
                //从数据库删除该人员信息
                //var deleteResult = deleteTalk(this.talkId);
                if(998==999){
                    this.$message({
                        type: 'error',
                        message: '删除上报信息失败!'
                    });
                }else{
                    this.$message({
                        type: 'success',
                        message: '删除成功!'
                    });
                    //this.handleTableInfo();
                }

            }).catch(() => {
                this.$message({
                    type: 'warning',
                    message: '已取消删除'
                });
            });
        },
        //删除人员信息
        handleDelete(index, row) {
            console.log(index, row);
            this.talkId = row.talkId;
            this.openDelete();
        },
        openDelete() {
            this.$confirm('确认删除此条人员信息?', '提示', {
                cancelButtonText: '取消',
                confirmButtonText: '确定',
                type: 'warning'
            }).then(() => {
                //从数据库删除该人员信息
                //var deleteResult = deleteTalk(this.talkId);
                if(998==999){
                    this.$message({
                        type: 'error',
                        message: '删除人员信息失败!'
                    });
                }else{
                    this.$message({
                        type: 'success',
                        message: '删除成功!'
                    });
                    //this.handleTableInfo();
                }

            }).catch(() => {
                this.$message({
                    type: 'warning',
                    message: '已取消删除'
                });
            });
        },
        //水闸列表
        handleSluiceInfo(index, row,){
            this.dialogSluiceVisible=true;
            this.dialogSluiceTitle=row.name+'——巡检测站列表';


        },
        filterTag(value, row) {
            return row.status === value;
        },
        filterTagFrequency(value, row){
            var loginNumber=0;
            if(value=='本月'){
                row.frequencyReal={
                    type:'success',
                    real:'20/30'
                };
            }else if(value=='本年'){
                row.frequencyReal={
                    type:'success',
                    real:'280/360'
                };
            }else if(value=='本旬'){
                row.frequencyReal={
                    type:'danger',
                    real:'2/10'
                };

            }
            return row.frequencyReal;
        },
        filterTagReport(value, row) {
            return row.reportTag === value;
        },
        filterTagWarning(value, row) {
            if ((row.reportTag.difference==value)||(row.reportTag.data==value)){
                return row.reportTag
            }
        },
        //打开测站列表后操作
        czOpenedHandle(){
            if (this.firstOpenSluiceList){
                //设置地图加载图层_影像底图
                var map_img_layer =new ol.layer.Tile({
                    opacity: 1,
                    preload: Infinity,
                    source: new ol.source.WMTS({
                        // 影像底图
                        url: "http://t0.tianditu.gov.cn/img_c/wmts?tk=" + webKey,
                        layer: 'img',
                        matrixSet: 'c',
                        format: 'tiles',
                        style: 'default',
                        VERSION:'1.0.0',
                        projection: projection,
                        maxZoom: 14,
                        tileGrid: new ol.tilegrid.WMTS({
                            origin: ol.extent.getTopLeft(projectionExtent),
                            resolutions: resolutions,
                            matrixIds: matrixIds
                        }),
                        wrapX: false
                    })

                });

                //设置初始化缩放，及中心位置
                var view1 = new ol.View({
                    center: [83.6, 46.12],
                    zoom: 8,
                    minZoom: 5,
                    maxZoom: 19,
                    projection: "EPSG:4326",
                    multiWorld: true,
                });
                //将图层加载到地图上
                map = new ol.Map({
                    controls: ol.control.defaults({
                        attribution: false,
                        zoom: false,
                        rotate: false
                    }),
                    target: 'map',
                    view: view1,
                    // layers: [
                    //     new ol.layer.Tile({
                    //         preload: 4,
                    //         source: new ol.source.OSM()
                    //     })
                    // ],
                    layers:[map_img_layer],
                    //overlays:[overlay],
                });

                // 擦除操作,生产遮罩范围
                function erase(geom) {
                    var extent = [-180,-90,180,90];
                    var polygonRing = ol.geom.Polygon.fromExtent(extent);
                    var coords = geom.getCoordinates();
                    coords.forEach(coord =>{
                        var linearRing = new ol.geom.LinearRing(coord[0]);
                        polygonRing.appendLinearRing(linearRing);
                    });
                    return polygonRing;
                }

                //添加遮罩
                function addconver(data) {
                    $.getJSON(data, function(data) {
                        var fts = new ol.format.GeoJSON().readFeatures(data);
                        var ft = fts[0];
                        var converGeom = erase(ft.getGeometry());
                        var convertFt = new ol.Feature({
                            geometry: converGeom
                        });
                        converLayer.getSource().addFeature(convertFt);
                    })
                }


                var dataURL = 'json/xj.json';
                addconver(dataURL);

                var mystyle = new ol.style.Style({
                    fill: new ol.style.Fill({
                        color:"#000a3f82",
                    }),
                    stroke: new ol.style.Stroke({
                        color:"#663403",
                        width:'0px',
                    })
                });

                var converLayer = new ol.layer.Vector({
                    source: new ol.source.Vector(),
                    style: mystyle
                });
                map.addLayer(converLayer);



                //首先创建水闸图层源文件,以及水渠
                iconSourceSluice = new ol.source.Vector({
                    features:[],
                });
                iconSourceSluiceText = new ol.source.Vector({
                    features:[],
                });
                //创建水闸图层,以及水渠
                iconLayerSluice = new ol.layer.Vector({
                    source: iconSourceSluice,
                    zIndex:998,
                });
                iconLayerSluiceText = new ol.layer.Vector({
                    source: iconSourceSluiceText,
                    zIndex:998,
                });
                //将图层添加至地图
                map.addLayer(iconLayerSluice);
                map.addLayer(iconLayerSluiceText);
                iconLayerSluiceText.setVisible(false);
                this.firstOpenSluiceList=false;
                //监听地图缩放事件
                map.on("moveend",function(e){
                    var zoom = map.getView().getZoom();  //获取当前地图的缩放级别
                    console.log(zoom);
                    if (zoom<14){
                        iconLayerSluiceText.setVisible(false);
                    }else if(zoom>13){
                        iconLayerSluiceText.setVisible(true);
                    }


                });
            }
            map.getView().animate(
                {
                    zoom: 8
                },{
                duration: 1200,
                center: [83.6, 46.12],
            });

            //读取后台数据并向，水闸图层添加水闸以及水渠
            function creatSluice(Id) {
                var humanId={
                    id:'660906000002',
                };
                creatHumanSluice(humanId,iconSourceSluice,iconSourceSluiceText);
            }
            creatSluice();
        },
        //打开单个测站位置查看后的操作
        handleSluiceOneInfo(index,row){
            this.sluiceLat=row.lat;
            this.sluiceLong=row.long;
            this.sluiceName=row.name;
            this.dialogSluiceTitleOne='小锡干干渠分水计量点';
            this.dialogSluiceVisibleOne=true;
        },
        sluiceVisibleOne(){
            if (this.firstOpenSluiceOne){
                //设置地图加载图层_影像底图
                var map_img_layer =new ol.layer.Tile({
                    opacity: 1,
                    preload: Infinity,
                    source: new ol.source.WMTS({
                        // 影像底图
                        url: "http://t0.tianditu.gov.cn/img_c/wmts?tk=" + webKey,
                        layer: 'img',
                        matrixSet: 'c',
                        format: 'tiles',
                        style: 'default',
                        VERSION:'1.0.0',
                        projection: projection,
                        maxZoom: 14,
                        tileGrid: new ol.tilegrid.WMTS({
                            origin: ol.extent.getTopLeft(projectionExtent),
                            resolutions: resolutions,
                            matrixIds: matrixIds
                        }),
                        wrapX: false
                    })

                });

                //设置初始化缩放，及中心位置
                var view1 = new ol.View({
                    center: [83.6, 46.12],
                    zoom: 8,
                    minZoom: 5,
                    maxZoom: 19,
                    projection: "EPSG:4326",
                    multiWorld: true,
                });
                //将图层加载到地图上
                mapOne = new ol.Map({
                    controls: ol.control.defaults({
                        attribution: false,
                        zoom: false,
                        rotate: false
                    }),
                    target: 'mapOne',
                    view: view1,
                    // layers: [
                    //     new ol.layer.Tile({
                    //         preload: 4,
                    //         source: new ol.source.OSM()
                    //     })
                    // ],
                    layers:[map_img_layer],
                    //overlays:[overlay],
                });

                // 擦除操作,生产遮罩范围
                function erase(geom) {
                    var extent = [-180,-90,180,90];
                    var polygonRing = ol.geom.Polygon.fromExtent(extent);
                    var coords = geom.getCoordinates();
                    coords.forEach(coord =>{
                        var linearRing = new ol.geom.LinearRing(coord[0]);
                        polygonRing.appendLinearRing(linearRing);
                    });
                    return polygonRing;
                }

                //添加遮罩
                function addconver(data) {
                    $.getJSON(data, function(data) {
                        var fts = new ol.format.GeoJSON().readFeatures(data);
                        var ft = fts[0];
                        var converGeom = erase(ft.getGeometry());
                        var convertFt = new ol.Feature({
                            geometry: converGeom
                        });
                        converLayer.getSource().addFeature(convertFt);
                    })
                }


                var dataURL = 'json/xj.json';
                addconver(dataURL);

                var mystyle = new ol.style.Style({
                    fill: new ol.style.Fill({
                        color:"#000a3f82",
                    }),
                    stroke: new ol.style.Stroke({
                        color:"#663403",
                        width:'0px',
                    })
                });

                var converLayer = new ol.layer.Vector({
                    source: new ol.source.Vector(),
                    style: mystyle
                });
                mapOne.addLayer(converLayer);



                //首先创建水闸图层源文件,以及水渠
                iconSourceSluiceOne = new ol.source.Vector({
                    features:[],
                });
                iconSourceSluiceTextOne = new ol.source.Vector({
                    features:[],
                });
                //创建水闸图层,以及水渠
                iconLayerSluiceOne = new ol.layer.Vector({
                    source: iconSourceSluiceOne,
                    zIndex:998,
                });
                iconLayerSluiceTextOne = new ol.layer.Vector({
                    source: iconSourceSluiceTextOne,
                    zIndex:998,
                });
                //将图层添加至地图
                mapOne.addLayer(iconLayerSluiceOne);
                mapOne.addLayer(iconLayerSluiceTextOne);
                this.firstOpenSluiceOne=false;
            }
            mapOne.getView().animate(
                {
                    zoom: 8
                },{
                    duration: 1200,
                    center: [83.6, 46.12],
                });

            //读取后台数据并向，水闸图层添加水闸以及水渠
            function creatSluiceOne() {
                creatSluiceLocation(83.56242,46.880295,'小锡干干渠分水计量点',iconSourceSluiceOne,iconSourceSluiceTextOne);
            }
            creatSluiceOne();
        },
        //测站定位
        handleSluiceLocation(index, row,){
            map.getView().animate({
                duration: 800,
                center: [83.56242, 46.880295],
            },{
                zoom: 18
            });
        },
        //测站查询
        sluiceSearch(){
            this.openNoSluice();
        },
        openNoSluice() {
            this.$confirm('未查询到相关测站信息，请检查您的输入?', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'warning'
            })
        },
        //加载提示
        openFullScreen2() {
            var loadingNow = this.$loading({
                lock: true,
                text: '正在加载用户信息',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.7)'
            });
            setTimeout(() => {
                loadingNow.close();
                $('.panel').css('display','inline-block');
            }, 3500);

        },
        //点击柱子提示
        openClickBar() {
            this.$confirm('点击柱子了?', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'warning'
            })
        },
        //历史登录统计查询
        historyLoginStatistic(){
            this.openLoginStatisticSuccess();
        },
        //人事信息导出成功
        openLoginStatisticSuccess() {
            this.$confirm('登录信息统计完成!', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },
        //日报筛选
        handleDailyFilter(){
            this.openFilterSuccess();
        },
        //报表选择成功
        openFilterSuccess() {
            this.$confirm('报表筛选完成！', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },
        //下辖测站信息窗口
        onPopoverShow(index,row){
            this.writeFilterInfoSuccess()
        },
        //报表选择成功
        writeFilterInfoSuccess() {
            this.$confirm('信息写入成功！', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },
        //日报预览
        handleDailyReportPreview(){
            window.open("./pdfJs/web/viewer.html?file=/pdfTest/pdfViewTest.pdf");//文件和viewer.html 不同路径，注意路径
        },
        //日报下载
        handleDailyReportDownload(){
            this.dailyReportDownloadSuccess();
        },
        //日报下载成功
        dailyReportDownloadSuccess() {
            this.$confirm('日报下载成功！', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },
        //提醒上报
        handleRemarkOpen(index,row){
            if(row.reportTag=='未完成'){
                this.openRemarkSuccess();
            }else{
                this.openRemarkAlready();
            }
        },
        //完成提醒功能
        openRemarkSuccess() {
            this.$confirm('已通过短信方式提醒巡检人上报信息！', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'success'
            })
        },
        openRemarkAlready() {
            this.$confirm('巡检人已完成信息上报！', '提示', {
                confirmButtonText: '确定',
                showCancelButton:false,
                type: 'warning'
            })
        },

    },
});




